package code.example.base.collection.queue;


import code.example.tool.LogFactory;

import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;

public class TestLinkedList {
    public void test(){
        Queue<Person> queue =new LinkedList<>();
        for(int i=100;i>0;i--){
            Person person =new Person();
            person.setName("N-"+i);
            person.setMoney(i*100);
            queue.offer(person);
        }
        Person person ;
        while( (person= queue.poll()) != null){
            LogFactory.getLog().info(person.toString());
        }
    }


    public static void main(String [] args){
        new TestLinkedList().test();
    }
}
